<?php
namespace App\Services;

class BaseServices{
    protected static $instance = [];

    public static function getInstance()
    {
        if((static::$instance[static::class] ?? null) instanceof static){
           return static::$instance[static::class];
        }
        return static::$instance[static::class] = new static();
    }
}

